package com.hc.comm.model;


import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class PushModel implements Serializable {

	public String refId;
	public String content;
	public int type; 
	public String title;
	public String name;
	public String extra;
	
	public PushModel() {
		title = "您有新的消息";
	}
	
	public String getJson() {
		String mesgges = "{\"type\":"+ type + ",\"refId\":\"" + refId + "\",\"extra\":\"" + (extra!=null?extra:"") + "\",\"title\":\"" + title + "\",\"content\":\"" + content + "\",\"name\":\"" + name + "\"}";
		return mesgges;//JSONObject.toJSONString(this);
	}
	
	public Map<String, String> getExtras() {
		HashMap<String, String> retMap = new HashMap<String, String>();
		
		retMap.put("type", ""+type);
		retMap.put("refId", ""+refId);
		retMap.put("title", ""+title);
		retMap.put("content", content!=null?content:"");
		retMap.put("name", ""+name);
		retMap.put("extra", extra!=null?extra:"");
		
		return retMap;//JSONObject.toJSONString(this);
	}
}
